home *** CD-ROM | disk | FTP | other *** search
/ The X-Philes (2nd Revision) / The X-Philes Number 1 (1995).iso / xphiles / coding / 80x86 / code32.lzh / DEL.RT < prev    next >
Text File  |  1993-01-09  |  858b  |  39 lines

  1. public  _del
  2. ;░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  3. ; Delete one item from list
  4. ; In:
  5. ;   BX - number to insert at
  6. ;   DX - total items present
  7. ;   ECX - size of each item
  8. ;   EBP - base of list
  9. ; Out:
  10. ;   EDI - item to fill with blank
  11. ;░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  12. _del:
  13.         push eax
  14.         pueh ecx
  15.         push edx
  16.         push esi
  17.         movzx eax,dx
  18.         dec eax
  19.         imul eax,ecx
  20.         add eax,ebp
  21.         movzx edi,bx
  22.         imul edi,ecx
  23.         add edi,ebp
  24.         lea esi,[edi+ecx]
  25.         sub dx,bx
  26.         movzx edx,dx
  27.         dec edx
  28.         jz short deldone
  29.         imul ecx,edx
  30.         rep movsb
  31. deldone:
  32.         mov edi,eax
  33.         pop esi
  34.         pop edx
  35.         pop ecx
  36.         pop eax
  37.         ret
  38.  
  39.